From: Ryan Lortie Date: Fri, 29 Jun 2012 03:55:33 +0000 (-0400) Subject: GActionMuxer: disconnect group signals on finalize X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~5672 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=1118ec9653a1b4298deca78b6f7c123a7c1ff941;p=gnome-shell.git GActionMuxer: disconnect group signals on finalize The signals for the action group were being disconnected when the action group was explicitly removed from the GActionMuxer but the same was not being done when it was finalized. This means that a change in the state of an action group that used to be associated with a finalized GActionMuxer would result in a crash. This would happen for stateful application actions after closing a window. https://bugzilla.gnome.org/show_bug.cgi?id=681399 --- diff --git a/src/gactionmuxer.c b/src/gactionmuxer.c index d8383064d..780fbdd11 100644 --- a/src/gactionmuxer.c +++ b/src/gactionmuxer.c @@ -392,6 +392,11 @@ static void g_action_muxer_free_group (gpointer data) { Group *group = data; + gint i; + + /* 'for loop' or 'four loop'? */ + for (i = 0; i < 4; i++) + g_signal_handler_disconnect (group->group, group->handler_ids[i]); g_object_unref (group->group); g_free (group->prefix); @@ -525,10 +530,6 @@ g_action_muxer_remove (GActionMuxer *muxer, g_action_muxer_action_removed (group->group, actions[i], group); g_strfreev (actions); - /* 'for loop' or 'four loop'? */ - for (i = 0; i < 4; i++) - g_signal_handler_disconnect (group->group, group->handler_ids[i]); - g_action_muxer_free_group (group); } }